package com.jy.rhin.infra.repo.notfication.publish.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jy.rhin.domain.notification.publish.entity.PublishMessageStatisticsDO;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Description: 消息通知次数统计表
 * @Author: lww
 * @Date: 2022/11/16
 */
@Data
@TableName("t_notification_log_statistics")
@NoArgsConstructor
public class PublishMessageStatisticsPO {

    /**
     * 通知日期
     */
    @TableId
    private Long id;

    /**
     * 通知日期
     */
    @TableField("notify_date")
    private Date notifyDate;
    /**
     * 通知次数
     */
    @TableField("total")
    private Integer total;

    public PublishMessageStatisticsPO(PublishMessageStatisticsDO publishMessageStatisticsDO) {
        this.notifyDate = publishMessageStatisticsDO.getNotifyDate();
        this.total = publishMessageStatisticsDO.getTotal();
    }
}
